import express from 'express';
import { getTravels, getTravelById, createTravel } from '../controllers/travelController.js';

const router = express.Router();

// 获取游记列表
router.get('/', getTravels);

// 获取游记详情
router.get('/:id', getTravelById);

// 创建游记
router.post('/', createTravel);

// 添加create路由
router.post('/create', createTravel);

export default router;